﻿<local:DocumentBase x:Class="WPFExcelReport.ARTICLEMASTER"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls"
                    xmlns:db="clr-namespace:ReflectionStudio.Core.Database;assembly=ReflectionStudio.Core"
                    xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" 
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:tra="clr-namespace:WPFExcelReport.TranslationByMarkupExtension;assembly=ReflectionStudio.Core"
                    Loaded="Window_Loaded" 
                    FontSize="16" 
                    Background="White" 
                    Title="织造工艺设计" 
                    HorizontalAlignment="Stretch"
                    Margin="0,0,0,0" 
                    VerticalAlignment="Stretch"
                     
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:INTEXDataSet  x:Key="iNTEXDataSet" />
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwWAFARBEN" Source="{Binding Path=WAFARBEN,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwBSSATZ" Source="{Binding Path=BSSATZ,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwBHSATZ" Source="{Binding Path=BHSATZ,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwBSFARB" Source="{Binding Path=BSFARB,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWTGEW" Source="{Binding Path=WTGEW,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWASTKE" Source="{Binding Path=WASTKE,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwBASTKE" Source="{Binding Path=BASTKE,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwWASTPASS" Source="{Binding Path=WASTPASS,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource   x:Key="vwWABIND" Source="{Binding Path=WABIND,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWTEINZ" Source="{Binding Path=WTEINZ,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWTPASS" Source="{Binding Path=WTPASS,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWTSCHUSS" Source="{Binding Path=WTSCHUSS,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWADART" Source="{Binding Path=WADART,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwBASTGA" Source="{Binding Path=BASTGA,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwWASTGA" Source="{Binding Path=WASTGA,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwDRAFTING" Source="{Binding Path=DRAFTING,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwPEGPLAN" Source="{Binding Path=PEGPLAN,Source={StaticResource iNTEXDataSet}}" />
        <CollectionViewSource  x:Key="vwSumBASTGA" Source="{Binding Path=BASTGA,Source={StaticResource iNTEXDataSet}}">
            <CollectionViewSource.GroupDescriptions>
                <dat:PropertyGroupDescription PropertyName="BAGGART" />
            </CollectionViewSource.GroupDescriptions>
        </CollectionViewSource>
    </local:DocumentBase.Resources>
    <Grid   DataContext="" Width="1200" Margin="10,10,0,0" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="Auto" />
            <RowDefinition  Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="300" />
            <ColumnDefinition Width="300" />
            <ColumnDefinition   Width="300" />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <StackPanel   Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <Expander  Header="查询条件"  Name="expQueryCond" ExpandDirection="Down" IsExpanded="True">
                <StackPanel  >
                    <WrapPanel Name="zoneCommand" Height="34" Margin="0,0,0,6">
                        <Label   Content="系统" Width="40" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                        <TextBox   Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                        <Label  Content="语言" Width="40" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                        <TextBox   IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                        <Label  Content="用户名" Width="60" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                        <TextBox  Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" />
                        <Label Content="密码" Width="40" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                        <PasswordBox  Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                        <Button  Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="34" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                            </Button.Background>
                        </Button>
                        <Button  Height="20"  Width="20" Margin="10,0,0,0" Name="btnDATADISPO" Click="btnDATADISPO_Click" 
                                             KeyboardNavigation.TabIndex="3" IsDefault="True"
                                 >
                            <Button.Background>
                                <ImageBrush ImageSource="/IntexReportClient;component/Resources/Images/16x16/properties.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Name="txtSetDispo">HWD01</TextBlock>
                        <TextBlock  Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                    </WrapPanel>
                    <WrapPanel>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <StackPanel  Grid.Row="0">
                                <WrapPanel>
                                    <Label   Content="客单:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                    <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper"/>
                                    <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0" Text="" HorizontalAlignment="Left"/>
                                    <TextBox  Name="txtVKPAUFPOS" Width="60" Margin="0,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" MaxLength="3"  KeyboardNavigation.TabIndex="0" />
                                    <Button  Height="20"  Width="20" Margin="10,0,0,0" Name="btnGetVKPOS" Click="btnGetVKPOS_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                                        </Button.Background>
                                    </Button> 
                                    <Button  Height="20"  Width="20" Margin="10,0,0,0" Name="btnInserABON" Click="btnInserABON_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Button Add.png" />
                                        </Button.Background>
                                    </Button>
                                    <Label   Content="数量" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                    <TextBlock Name="txtVKPMENGE1" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPMENGE1, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=d100}}"></TextBlock>
                                    <TextBlock Name="txtVKPMEEH" Margin="10,0,0,0" Width="Auto" MinWidth="40" Background="Gray" Text="{Binding Path=VKPMEEH, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                                    <Label   Content="交期" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                    <TextBlock Name="txtVKPLIEFTERM" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPLIEFTERM, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                                </WrapPanel>
                                <WrapPanel >
                                    <Label   Content="品种:" Width="38" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                    <TextBox  Name="txtART"  MaxLength="20" Width="240" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                    <TextBox  Name="txtVAR" MaxLength="2" Width="40" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                    <Button Height="Auto" Margin="10,0,0,0" Name="btnQuery" HorizontalAlignment="Right" Width="30" Click="btnQuery_Click">
                                        <Button.Background>
                                            <ImageBrush   ImageSource="/IntexReportClient;component/Images/Search.png" />
                                        </Button.Background>
                                    </Button>
                                    <TextBlock  Margin="20,0,0,0" Width="43">颜色:</TextBlock>
                                    <TextBox  Name="txtWAFZUSATZ" Text="中色        " Background="#17000000" Height="27" Width="44">
                                    </TextBox>
                                    <TextBlock  Margin="20,0,0,0" Width="60" Height="24">后整理:</TextBlock>
                                    <TextBox  Name="txtFINISH" Text="F1          " Background="#17000000" Height="24" Width="53">
                                    </TextBox>
                                    <Button Content="工艺单" Margin="10,0,0,0" Name="btnReport" Width="75" Click="btnReport_Click" />
                                    <Button   Content="预览" Margin="10,0,0,0" Name="btnPrintPreview" Width="51" Click="btnPrintPreview_Click" />
                                    <Button  Margin="10,0,0,0" Name="btnPrint" Width="90" Click="btnPrint_Click" Visibility="Hidden"/>

                                </WrapPanel>
                            </StackPanel>
                            <Expander Name="exVKPOS"  Header="展开/折叠订单信息" Grid.Row="1" IsExpanded="False">
                                <wep:VKPOS x:Name="znVKPOS" />
                            </Expander>
                        </Grid>
                    </WrapPanel>
                </StackPanel>
            </Expander>
            <Expander  Name="znWS" Header="技术数据" ExpandDirection="Down" IsExpanded="True" MaxWidth="1000" HorizontalAlignment="Left">
                <StackPanel  DataContext="{Binding Source={StaticResource ResourceKey=vwWASTAMM}}">
                    <WrapPanel  >
                        <Button  Name="btnSaveWASTAMM" Click="btnSaveWASTAMM_Click" Width="20" Height="20">
                            <Button.Background>
                                <ImageBrush  ImageSource="/IntexReportClient;component/Images/Save.png" />
                            </Button.Background>
                        </Button>
                    </WrapPanel>
                    <StackPanel >
                        <WrapPanel >
                            <TextBlock  >成品信息:</TextBlock>
                            <Label  Margin="20,0,0,0"  Background="Gray" Content="品种:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox Grid.Column="1" Text="{Binding Path=WAART, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="180" CharacterCasing="Upper"/>
                            <TextBlock   Text="/" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox   Grid.Column="1" Text="{Binding Path=WAVAR, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="40" CharacterCasing="Upper" />
                            <Label Background="Gray" Content="计划品名:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <ComboBox  Grid.Column="1" HorizontalAlignment="Left" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" Text="{Binding Path=WADART, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}}" DisplayMemberPath="WADART" SelectedValuePath="WADART" ItemsSource="{Binding  Source={StaticResource ResourceKey=vwWADART}}" VerticalAlignment="Center" Width="120">
                            </ComboBox>
                            <TextBlock   Text="/" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox  Grid.Column="1" Text="{Binding Path=WADVAR, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="40" />
                        </WrapPanel>
                        <WrapPanel   Margin="86,0,0,0">
                            <Label  Content="描述:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox  MaxLength="40" Text="{Binding Path=WABEZ, Mode=TwoWay, Converter={StaticResource ResourceKey=gb2312}}" 
                                      VerticalAlignment="Center" Width="330" MaxLines="1"  Background="#FFEBA9A9"
                                      GotFocus="TextBox_GotFocus"
                                      >
                            </TextBox>
                            <Label Content="备注:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox   MaxLength="40" Text="{Binding Path=WARBEM, Mode=TwoWay, Converter={StaticResource ResourceKey=gb2312}}" 
                                       VerticalAlignment="Center" Width="330" MaxLines="1"
                                       GotFocus="TextBox_GotFocus"
                                       Background="#FFEBA9A9" />
                        </WrapPanel>
                        <WrapPanel  >
                            <Grid Margin="86,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition   Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="经密:" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WAFFDDIK, Mode=TwoWay, Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid   Margin="0,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition   Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="成品纬密:" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WAFFDDIS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>

                            <TextBlock >(</TextBlock>
                            <Label  Content="{Binding Path=WAFDDIM}" VerticalAlignment="Center" Width="40" Height="25" />
                            <TextBlock >)</TextBlock>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <WrapPanel  Grid.Column="1">
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <WrapPanel  Grid.Column="1">
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="幅宽:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WAFBRTL, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="Auto" MinWidth="40" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="成品匹长:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WAFSTDLG, Mode=TwoWay,  Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="成品克重:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WAFGRLFD, Mode=TwoWay}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                   <TextBlock>g/m</TextBlock>
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="纬密系数:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WALAEAEND, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="Auto" MinWidth="20" />
                                    <TextBlock >%</TextBlock>
                                </WrapPanel>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel >
                            <TextBlock >坯布信息:</TextBlock>
                            <Grid  Margin="20,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="经密:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-2,3,0,3" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WARFDDIK, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label  Content="下机纬密:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox   Grid.Column="1" Text="{Binding Path=WARFDDIS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>

                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel   Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="幅宽:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel   Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WARWBRT, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="标准匹长:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WARSTDLG, Mode=TwoWay,  Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="坯布克重:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WARGRLFD, Mode=TwoWay}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                    <TextBlock>g/m</TextBlock>
                                </WrapPanel>
                            </Grid>
                        </WrapPanel>
                        <StackPanel  >
                            <WrapPanel  DataContext="{Binding Source={StaticResource ResourceKey=vwWTGEW}}">
                                <TextBlock  >工艺信息:</TextBlock>
                                <Grid   Margin="20,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition   Width="1*" />
                                        <ColumnDefinition   Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="机上纬密:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-3,3,0,3" />
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WTGFDISM, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid   Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition   Width="1*" />
                                        <ColumnDefinition   Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="引纬纱长:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WTGFDLGS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition  Width="1*" />
                                        <ColumnDefinition  Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label   Content="筘幅:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WTGWBBRT, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <TextBlock x:Uid="TextBlock_10">cm</TextBlock>
                                <Grid x:Uid="Grid_15" Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_31" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_32" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label x:Uid="Label_22" Content="筘号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="TextBox_17" Grid.Column="1" Text="{Binding Path=WTGWBF, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <TextBlock x:Uid="TextBlock_11" Width="11">#</TextBlock>
                            </WrapPanel>
                            <WrapPanel  Margin="92,0,0,0">
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_33" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_34" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Content="纹板图" VerticalAlignment="Center" Margin="-2,1,2,1" />
                                    <ComboBox Grid.Column="1" Background="Wheat" 
                                              Width="Auto"
                                              MinWidth="100"
                                              HorizontalAlignment="Left" IsEditable="True" StaysOpenOnEdit="True" 
                                              IsTextSearchEnabled="True" 
                                              Text="{Binding Path=WABIND, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}, Converter={StaticResource ResourceKey=gb2312}}" DisplayMemberPath="WABINDKEY" SelectedValuePath="WABINDKEY" ItemsSource="{Binding  Source={StaticResource ResourceKey=vwWABIND}}" 
                                              VerticalAlignment="Center" x:Name="cmbWABIND" SelectionChanged="cmbWABIND_SelectionChanged" >
                                    </ComboBox>
                                </Grid>
                                <Grid x:Uid="Grid_17">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_35" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_36" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="扦筘法:" VerticalAlignment="Center" Margin="0,1" />
                                    <ComboBox  Grid.Column="1" HorizontalAlignment="Left" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" Text="{Binding Path=WAEINZNR, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}}" DisplayMemberPath="WTEEINZNR" SelectedValuePath="WTEEINZNR" ItemsSource="{Binding  Source={StaticResource ResourceKey=vwWTEINZ}}" VerticalAlignment="Center" Width="120">
                                    </ComboBox>
                                </Grid>
                                <Grid x:Uid="Grid_18">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_37" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_38" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <WrapPanel x:Uid="WrapPanel_22" Grid.Column="0">
                                    </WrapPanel>
                                    <Label x:Uid="Label_25" Content="纬向排花:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <WrapPanel x:Uid="WrapPanel_23" Grid.Column="1">
                                        <ComboBox x:Uid="cmbWFPattern" Background="Wheat" HorizontalAlignment="Left" 
                                                  IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" Text="{Binding Path=WTGSFLG, Source={StaticResource ResourceKey=vwWTGEW}, Mode=TwoWay}" 
                                                  DisplayMemberPath="WTSSFLGNR" SelectedValuePath="WTSSFLGNR" 
                                                  ItemsSource="{Binding  Source={StaticResource ResourceKey=vwWTSCHUSS}}" 
                                                  VerticalAlignment="Center" x:Name="cmbWFPattern"
                                                  SelectionChanged="cmbWFPattern_SelectionChanged" Width="120">
                                        </ComboBox>
                                    </WrapPanel>
                                </Grid>
                                <Grid x:Uid="Grid_19">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_40" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label x:Uid="Label_26" Content="穿综图:" VerticalAlignment="Center" Margin="0,1" />
                                    <ComboBox Grid.Column="1" Width="Auto" 
                                                MinWidth="100"
                                              HorizontalAlignment="Left" IsEditable="True" StaysOpenOnEdit="True" IsTextSearchEnabled="True" Text="{Binding Path=WSPPASS, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTPASS}, Converter={StaticResource ResourceKey=gb2312}}" DisplayMemberPath="WTPPASSNR" SelectedValuePath="WTPPASSNR" ItemsSource="{Binding  Source={StaticResource ResourceKey=vwWTPASS}}" VerticalAlignment="Center" >
                                    </ComboBox>
                                </Grid>
                            </WrapPanel>
                        </StackPanel>
                    </StackPanel>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="440"></ColumnDefinition>
                            <ColumnDefinition Width="20"></ColumnDefinition>
                            <ColumnDefinition Width="440"></ColumnDefinition>                            
                        </Grid.ColumnDefinitions> 
                        <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" >
                            <TextBlock>经轴信息:</TextBlock>
                            <Button  Name="btnNewWASTKE" Click="btnNewWASTKE_Click" Width="26" Height="26">
                                <Button.Background>
                                    <ImageBrush  ImageSource="/IntexReportClient;component/Images/Button%20Add.png" />
                                </Button.Background>
                            </Button>
                            <CheckBox   Name="IsSectionBeam" Content="分条整经" IsChecked="True" />
                            <Label  Margin="20,0,0,0"  Content="总头份:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox   Name="txtTTENDS" Text="0" VerticalAlignment="Center" Width="80" />
                            <Label  Margin="20,0,0,0" Content="经轴数:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox  Name="txtNOBEAM" Text="0" VerticalAlignment="Center" Width="40" />
                            <TextBlock  Margin="20,0,0,0" FontSize="14" Foreground="Green">勾选为分条整 经，否则为分批整经</TextBlock>
                        </WrapPanel>
                        <WrapPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" >
                           
                        </WrapPanel>
                        <fd:FilteringDataGrid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="1" 
                                              AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwWASTKE}}" HeadersVisibility="Column" x:Name="dlgWASTKE" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="dlgWASTKE_SelectionChanged">
                            <DataGrid.Columns>
                                <DataGridTextColumn  Binding="{Binding Path=WAKKART}" Header="织轴品种"  Width="Auto" MinWidth="80" />
                                <DataGridTextColumn Binding="{Binding Path=WAKKVAR}" Header="版本"  Width="Auto" MinWidth="20"  />
                                <DataGridTextColumn  Binding="{Binding Path=WAKKFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="色号"  Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=WAKEAFAKTR}" Header="系数"  Width="Auto" MinWidth="40"  />
                                <DataGridTextColumn Binding="{Binding Path=WAKLLEIST}" Header="左布边"  Width="Auto" MinWidth="60"  />
                                <DataGridTextColumn Binding="{Binding Path=WAKRLEIST}" Header="右布边"  Width="Auto" MinWidth="60" />
                            </DataGrid.Columns>
                        </fd:FilteringDataGrid>
                        <fd:FilteringDataGrid Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="1"  AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwBASTKE}}" HeadersVisibility="Column" x:Name="dlgBASTKE" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="dlgBASTKE_SelectionChanged">
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=BAKPOS}" Header="行" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=BAKPATT}" Header="代号" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn  Binding="{Binding Path=BAKANZ}" Header="个数" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn  Binding="{Binding Path=BAKKART}" Header="经轴品种" Width="Auto" MinWidth="100" />
                                <DataGridTextColumn Binding="{Binding Path=BAKKVAR}" Header="版本" Width="Auto" MinWidth="20" />
                                <DataGridTextColumn Binding="{Binding Path=BAKKFARBE}" Header="色号" Width="Auto" MinWidth="60" />
                                <DataGridTextColumn  Binding="{Binding Path=BAKABF}" Header="损耗" Width="Auto" MinWidth="60" />
                            </DataGrid.Columns>
                        </fd:FilteringDataGrid>
                    </Grid>
                </StackPanel>
            </Expander>

            <Expander  Name="znBS" Header="用纱信息" ExpandDirection="Down" IsExpanded="True">
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="440" />
                        <ColumnDefinition   Width="20" />
                        <ColumnDefinition  Width="440" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="1"  >经纱信息</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="1"  >纬纱信息</TextBlock>
                    <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"  > 
                                <WrapPanel  DataContext="{Binding Source={StaticResource vwBSSATZ}}">
                                    <Button x:Uid="btnNewWYarn" Name="btnNewWYarn" Click="btnNewWYarn_Click" Width="26" Height="26">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Button%20Add.png" />
                                        </Button.Background>
                                    </Button>
                                    <Button x:Uid="btnSaveWYarn" Name="btnSaveWYarn" Click="btnSaveWYarn_Click" Width="26" Height="26">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Save.png" />
                                        </Button.Background>
                                    </Button>
                                    <Label  Content="代号:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Background="LightGray" Text="{Binding BAKPATT, Mode=TwoWay, Source={StaticResource ResourceKey=vwBASTKE}}" VerticalAlignment="Center" Width="Auto" MinWidth="20" />
                                    <Label Content="个数:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox  Background="White" Text="{Binding BAKANZ, Mode=TwoWay, Source={StaticResource ResourceKey=vwBASTKE}}" VerticalAlignment="Center" Width="Auto" MinWidth="20" />
                                    <Label Content="头份:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="WBEnds" Name="WBEnds" Background="White" Text="{Binding BSFDZ, Mode=TwoWay}" VerticalAlignment="Center" Width="60" />
                                    <Label x:Uid="Label_32" Content="花型:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <!--TextBox  Name="WBPattern" Background="White"     VerticalAlignment="Center" Width="80" /-->
                                    <ComboBox x:Uid="cmbWBPattern" Background="Wheat" HorizontalAlignment="Left" IsEditable="True" StaysOpenOnEdit="True" 
                                              IsTextSearchEnabled="True" Text="{Binding BSSRFNR, Mode=TwoWay}" 
                                              DisplayMemberPath="WTBSRFNR" SelectedValuePath="WTBSRFNR" 
                                              ItemsSource="{Binding Path=WTSAER, Source={StaticResource ResourceKey=iNTEXDataSet}}" 
                                              VerticalAlignment="Center" x:Name="cmbWBPattern" 
                                              SelectionChanged="cmbWBPattern_SelectionChanged" Width="120">
                                    </ComboBox>
                                </WrapPanel>
                                <WrapPanel >
                                    <TextBlock Margin="0,0,0,0" FontSize="14" Foreground="Green" Width="408">其上为内径头份，请从右边纱线列表选择纱线</TextBlock>
                                </WrapPanel>
                                <fd:FilteringDataGrid x:Uid="dlgBBASTGA" AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwBASTGA}}" HeadersVisibility="Column" x:Name="dlgBBASTGA" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="dlgBASTGA_SelectionChanged">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_22" Binding="{Binding Path=BAGPOS}" Header="行" Width="Auto" MinWidth="30" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_23" Binding="{Binding Path=BAGGART}" Header="纱线" Width="Auto" MinWidth="120" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_24" Binding="{Binding Path=BAGGVAR}" Header="版本" Width="Auto" MinWidth="30" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_25" Binding="{Binding Path=BAGFDZ}" Header="根数" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_26" Binding="{Binding Path=BAGABF, Converter={StaticResource ResourceKey=d10}}" Header="损耗" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_27" Binding="{Binding Path=BAGKGNET, Converter={StaticResource ResourceKey=d1000}}" Header="净重" Width="Auto" MinWidth="60" />
                                        <DataGridTextColumn x:Uid="DataGridTextColumn_28" Binding="{Binding Path=BAGKGBRUT, Converter={StaticResource ResourceKey=d1000}}" Header="总重" Width="Auto" MinWidth="60" />
                                    </DataGrid.Columns>
                                </fd:FilteringDataGrid>
                                <WrapPanel x:Uid="WrapPanel_27" DataContext="{Binding Source={StaticResource ResourceKey=vwBASTGA}}">
                                    <Label x:Uid="Label_33" Content="行号:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock x:Uid="TextBlock_14" Background="LightGray" Text="{Binding Path=BAGPOS, Mode=TwoWay}" VerticalAlignment="Center" Width="40" />
                                    <Label x:Uid="Label_34" Content="头份:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="TextBox_19" Background="White" Text="{Binding Path=BAGFDZ, Mode=TwoWay}" VerticalAlignment="Center" Width="60" />
                                    <Label x:Uid="Label_35" Content="纱线:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="txtGART" Name="txtGART" Background="White" Text="{Binding Path=BAGGART, Mode=TwoWay}" VerticalAlignment="Center" Width="180" />
                                    <TextBox x:Uid="txtGVAR" Name="txtGVAR" Background="AliceBlue" Text="{Binding Path=BAGGVAR, Mode=TwoWay}" VerticalAlignment="Center" Width="40" />
                                </WrapPanel>
                                <WrapPanel x:Uid="WrapPanel_28" DataContext="{Binding Source={StaticResource ResourceKey=vwBASTGA}}">
                                    <Label x:Uid="Label_36" Content="损耗:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="txtGFARBE" Name="txtGFARBE" Background="White" Text="{Binding Path=BAGABF, Mode=TwoWay, Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="40" />
                                    <Label x:Uid="Label_37" Content="净用量:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox x:Uid="txtBAGKGNET" Name="txtBAGKGNET" Background="White" GotFocus="txtBAGKGNET_GotFocus" Text="{Binding Path=BAGKGNET, Mode=TwoWay, Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="80" />
                                    <Label x:Uid="Label_38" Content="总用量:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox Name="txtBAGKGBRUT" Background="White" Text="{Binding Path=BAGKGBRUT, Mode=TwoWay, Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="80" />
                                    <TextBlock >每100米轴长</TextBlock>
                                </WrapPanel>
                                <WrapPanel>
                                    <TextBlock  FontSize="12" Foreground="Green">因为劈花问题，纱线根数计算可能有误。请仔细核对或手工修改纱线投头份。</TextBlock>
                                </WrapPanel>
                                <TextBlock >经纱汇总信息：</TextBlock>
                                <fd:FilteringDataGrid  AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding}" HeadersVisibility="Column" x:Name="dlgSumBASTGA" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="80" MaxHeight="200">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Binding="{Binding Path=BAGGART}" Header="纱线" Width="160" />
                                        <DataGridTextColumn Binding="{Binding Path=BAGGVAR}" Header="版本" Width="40" />
                                        <DataGridTextColumn Binding="{Binding Path=sumBAGKGNET}" Header="净重" Width="60" />
                                        <DataGridTextColumn Binding="{Binding Path=sumBAGKGBRUT}" Header="总重" Width="60" />
                                        <DataGridTextColumn Binding="{Binding Path=sumBAGFDZ}" Header="总根数" Width="60" />
                                        <DataGridTextColumn Binding="{Binding Path=sumBeam}" Header="轴数" Width="40" />
                                    </DataGrid.Columns>
                                </fd:FilteringDataGrid>
                            </StackPanel>
 
                    <StackPanel Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="1"  >
                                <WrapPanel >
                                    <Button  Name="btnNewFYarn" Click="btnNewFYarn_Click" Width="26" Height="26">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Button%20Add.png" />
                                        </Button.Background>
                                    </Button>
                                    <Button  Name="btnSaveFYarn" Click="btnSaveFYarn_Click" Width="26" Height="26">
                                        <Button.Background>
                                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Save.png" />
                                        </Button.Background>
                                    </Button>
                                    <Label Content="花型:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Grid.Column="1" Background="LightGray" Text="{Binding Path=WTGSFLG, Mode=TwoWay, 
                                Source={StaticResource ResourceKey=vwWTGEW}}"
                                       VerticalAlignment="Center" Width="Auto" MinWidth="80" />
                                </WrapPanel>
                                <fd:FilteringDataGrid Grid.Column="0" AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwWASTGA}}" HeadersVisibility="Column" x:Name="dlgWASTGA" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" SelectionChanged="dlgWASTGA_SelectionChanged" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                                    <DataGrid.Columns>
                                        <DataGridTextColumn Binding="{Binding Path=WAGPOS}" Header="行" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGGART}" Header="纱线" Width="Auto" MinWidth="160" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGGVAR}" Header="版本" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGFDZ}" Header="根数" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGABF,  Converter={StaticResource ResourceKey=d10}}" Header="损耗" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGKGNET, Converter={StaticResource ResourceKey=d1000}}" Header="净重" Width="Auto" MinWidth="40" />
                                        <DataGridTextColumn Binding="{Binding Path=WAGKGBRUT,  Converter={StaticResource ResourceKey=d1000}}" Header="总重" Width="Auto" MinWidth="40" />
                                    </DataGrid.Columns>
                                </fd:FilteringDataGrid>
                                <WrapPanel DataContext="{Binding Source={StaticResource ResourceKey=vwWASTGA}}">
                                    <Label Content="行号:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock  Background="LightGray" Text="{Binding Path=WAGPOS, Mode=TwoWay}" VerticalAlignment="Center" Width="40" />
                                    <Label  Content="头份:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox Background="White" Text="{Binding Path=WAGFDZ, Mode=TwoWay}" VerticalAlignment="Center" Width="60" />
                                    <Label  Content="纱线:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox  Name="txtFGART" Background="White" Text="{Binding Path=WAGGART, Mode=TwoWay}" VerticalAlignment="Center" Width="180" />
                                    <TextBox Name="txtFGVAR" Background="AliceBlue" Text="{Binding Path=WAGGVAR, Mode=TwoWay}" VerticalAlignment="Center" Width="40" />
                                </WrapPanel>
                                <WrapPanel  DataContext="{Binding Source={StaticResource ResourceKey=vwWASTGA}}">
                                    <Label  Content="损耗:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox Background="White" Text="{Binding Path=WAGABF, Mode=TwoWay, Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="40" />
                                    <Label  Content="净用量:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox  Name="txtWAGKGNET" Background="White" GotFocus="txtWAGKGNET_GotFocus" Text="{Binding Path=WAGKGNET, Mode=TwoWay, Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="80" />
                                    <Label  Content="总用量:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox Name="txtWAGKGBRUT" Background="White" Text="{Binding Path=WAGKGBRUT, Mode=TwoWay, Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="80" />
                                    <TextBlock >/每100米坯布</TextBlock>
                                </WrapPanel>
                            </StackPanel> 
                </Grid>
            </Expander>

            <Expander Header="纹版/穿综图" ExpandDirection="Down" IsExpanded="True">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" ></RowDefinition>
                        <RowDefinition Height="Auto" ></RowDefinition>
                        <RowDefinition Height="Auto" MinHeight="100" ></RowDefinition>
                        <RowDefinition Height="Auto" MinHeight="100" ></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="8">
                        <WrapPanel >
                            <Button  Height="20"  Width="20" Margin="10,0,0,0" Name="btnQueryWEAVE" Click="btnQueryWEAVE_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                                <Button.Background>
                                    <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                                </Button.Background>
                            </Button>
                            <Button  Name="btnSaveWEAVE" Click="btnSaveWEAVE_Click" Width="26" Height="26">
                                <Button.Background>
                                    <ImageBrush ImageSource="/IntexReportClient;component/Images/Save.png" />
                                </Button.Background>
                            </Button>
                        </WrapPanel> 
                            <WrapPanel>
                                <TextBlock >纹板图：</TextBlock>
                                <TextBox Name="txtPEGPLAN"  Width="Auto" Text="{Binding Path=WABIND, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}, Converter={StaticResource ResourceKey=gb2312}}"  CharacterCasing="Upper"></TextBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock >穿综图：</TextBlock>
                                <TextBox Name="txtDRAFTING"  Width="Auto" Text="{Binding Path=WSPPASS, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTPASS}, Converter={StaticResource ResourceKey=gb2312}}"  CharacterCasing="Upper"></TextBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock >综框片数：</TextBlock>
                                <ComboBox Name="cmbDRAFT" Width="80" SelectionChanged="cmbDRAFT_SelectionChanged">
                                    <ComboBoxItem Content="2"/>
                                    <ComboBoxItem Content="3"/>
                                    <ComboBoxItem Content="4"/>
                                    <ComboBoxItem Content="5"/>
                                    <ComboBoxItem Content="6"/>
                                    <ComboBoxItem Content="7"/>
                                    <ComboBoxItem Content="8"/>
                                    <ComboBoxItem Content="9"/>
                                    <ComboBoxItem Content="10"/>
                                    <ComboBoxItem Content="11"/>
                                    <ComboBoxItem Content="12"/>
                                    <ComboBoxItem Content="13"/>
                                    <ComboBoxItem Content="14"/>
                                    <ComboBoxItem Content="15"/>
                                    <ComboBoxItem Content="16"/>
                                </ComboBox>
                            </WrapPanel> 
                    </WrapPanel>
                    <WrapPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="8">
                        <Label Content="穿综描述:"  HorizontalAlignment="Left" VerticalAlignment="Center" />
                        <TextBox Name="txtWTPBEZ" Text="{Binding Path=DFADES, Mode=TwoWay, Source={StaticResource vwDRAFTING}}" VerticalAlignment="Center" MaxLength="60" Width="622" MaxLines="1" TextChanged="txtWTPBEZ_TextChanged" />
                    </WrapPanel>
                    <StackPanel Grid.Row="2" Grid.Column="0"  >             
                    <TextBlock >综框片:</TextBlock>
                        <TextBlock ></TextBlock>
                        <TextBlock ></TextBlock>
                      <TextBlock>纹版行:</TextBlock>
                    </StackPanel>
                    <DataGrid  Grid.Row="2" Grid.Column="1" Margin="0,0,0,0" Grid.ColumnSpan="6" AutoGenerateColumns="False"
                              EnableRowVirtualization="False" EnableColumnVirtualization="False"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwDRAFTING}}" 
                              x:Name="dlgDRAFTING"  
                              MouseEnter="dlgWEAVE_MouseEnter"  
                              RowHeight="23"
                              FontSize="14"
                              Width="Auto" >
                        <DataGrid.LayoutTransform>
                            <TransformGroup>
                                <RotateTransform Angle="270"/>
                                <MatrixTransform Matrix="1,0,0,1,0,0"/>
                            </TransformGroup>
                        </DataGrid.LayoutTransform>
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="{x:Type DataGridColumnHeader}" 
                BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
                                <Setter Property="LayoutTransform">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <RotateTransform Angle="-270"/>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                        <DataGrid.CellStyle>
                            <Style  TargetType="DataGridCell">
                                <Setter Property="LayoutTransform">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <RotateTransform Angle="-270"/>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DataGrid.CellStyle>
                        <DataGrid.Columns>
                            <DataGridTextColumn  x:Name="cDF01" Binding="{Binding Path=D01}" Header="1" Width="23"  />
                            <DataGridTextColumn  x:Name="cDF02" Binding="{Binding Path=D02}" Header="2" Width="23" />
                            <DataGridTextColumn   x:Name="cDF03" Binding="{Binding Path=D03}" Header="3" Width="23" />
                            <DataGridTextColumn   x:Name="cDF04" Binding="{Binding Path=D04}" Header="4" Width="23" />
                            <DataGridTextColumn   x:Name="cDF05" Binding="{Binding Path=D05}" Header="5" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF06" Binding="{Binding Path=D06}" Header="6" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn  x:Name="cDF07" Binding="{Binding Path=D07}" Header="7" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF08" Binding="{Binding Path=D08}" Header="8" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF09" Binding="{Binding Path=D09}" Header="9" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn  x:Name="cDF10" Binding="{Binding Path=D10}" Header="10" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn  x:Name="cDF11" Binding="{Binding Path=D11}" Header="11" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn  x:Name="cDF12" Binding="{Binding Path=D12}" Header="12" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF13" Binding="{Binding Path=D13}" Header="13" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF14" Binding="{Binding Path=D14}" Header="14" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF15" Binding="{Binding Path=D15}" Header="15" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn   x:Name="cDF16" Binding="{Binding Path=D16}" Header="16" Width="23"  Visibility="Hidden"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"   AutoGenerateColumns="False"
                        EnableRowVirtualization="False" EnableColumnVirtualization="False"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwPEGPLAN}}" 
                              x:Name="dlgPEGPLAN"  
                              MouseEnter="dlgWEAVE_MouseEnter" 
                              Width="Auto"   
                              FontSize="14"
                              RowHeight="23" 
                              >
                        <DataGrid.LayoutTransform>
                            <TransformGroup>
                                <RotateTransform Angle="180"/>
                                <MatrixTransform Matrix="-1,0,0,1,0,0"/>
                            </TransformGroup>
                        </DataGrid.LayoutTransform>
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="{x:Type DataGridColumnHeader}" 
                BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
                                <Setter Property="LayoutTransform">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <RotateTransform Angle="-180"/>
                                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                        <DataGrid.CellStyle>
                            <Style  TargetType="DataGridCell">
                                <Setter Property="LayoutTransform">
                                    <Setter.Value>
                                        <TransformGroup>
                                            <RotateTransform Angle="-180"/>
                                            <ScaleTransform ScaleX="-1" ScaleY="1" />
                                        </TransformGroup>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </DataGrid.CellStyle>

                        <DataGrid.Columns>
                            <DataGridTextColumn x:Name="cFN" Binding="{Binding Path=FN}" Header="N" Width="23" />
                            <DataGridTextColumn x:Name="cPG01" Binding="{Binding Path=PG01}" Header="1" Width="23" />
                            <DataGridTextColumn x:Name="cPG02" Binding="{Binding Path=PG02}" Header="2" Width="23" />
                            <DataGridTextColumn x:Name="cPG03" Binding="{Binding Path=PG03}" Header="3" Width="23" />
                            <DataGridTextColumn x:Name="cPG04" Binding="{Binding Path=PG04}" Header="4" Width="23"  />
                            <DataGridTextColumn x:Name="cPG05" Binding="{Binding Path=PG05}" Header="5" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG06" Binding="{Binding Path=PG06}" Header="6" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG07" Binding="{Binding Path=PG07}" Header="7" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG08" Binding="{Binding Path=PG08}" Header="8" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG09" Binding="{Binding Path=PG09}" Header="9" Width="23" Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG10" Binding="{Binding Path=PG10}" Header="10" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG11" Binding="{Binding Path=PG11}" Header="11" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG12" Binding="{Binding Path=PG12}" Header="12" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG13" Binding="{Binding Path=PG13}" Header="13" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG14" Binding="{Binding Path=PG14}" Header="14" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG15" Binding="{Binding Path=PG15}" Header="15" Width="23"  Visibility="Hidden"/>
                            <DataGridTextColumn x:Name="cPG16" Binding="{Binding Path=PG16}" Header="16" Width="23" Visibility="Hidden"/>
                        </DataGrid.Columns>
                    </DataGrid>
                 </Grid>
            </Expander> 
        </StackPanel>

        <StackPanel  Grid.Row="0" Grid.RowSpan="3" Grid.Column="3">
            <Expander Header="经向排花">
                <fd:FilteringDataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" 
                                      ItemsSource="{Binding Path=WTSAER, Source={StaticResource ResourceKey=iNTEXDataSet}}" HeadersVisibility="Column" x:Name="dlgWTSAER" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Height="Auto" MaxHeight="300" SelectionChanged="dlgWTSAER_SelectionChanged" EnableColumnVirtualization="False" HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WTBSRFNR}" Header="花型编号" Width="160" />
                        <DataGridTextColumn Binding="{Binding Path=WTBBEZ}" Header="描述" Width="140" />
                    </DataGrid.Columns>
                </fd:FilteringDataGrid>
            </Expander>
            <Expander  Header="纬向排花">
                <fd:FilteringDataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Path=WTSCHUSS, Source={StaticResource ResourceKey=iNTEXDataSet}}" HeadersVisibility="Column" x:Name="dlgWTSCHUSS" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Height="Auto" MaxHeight="300" SelectionChanged="dlgWTSCHUSS_SelectionChanged" EnableColumnVirtualization="False" HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WTSSFLGNR}" Header="花型编号" Width="160" />
                        <DataGridTextColumn  Binding="{Binding Path=WTSBEZ}" Header="描述" Width="140" />
                    </DataGrid.Columns>
                </fd:FilteringDataGrid>
            </Expander>
            <Expander Header="纱线列表">
                <fd:FilteringDataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Path=GSDAT, Source={StaticResource ResourceKey=iNTEXDataSet}}" HeadersVisibility="Column" x:Name="dlgGSDAT" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" RowDetailsVisibilityMode="VisibleWhenSelected" Height="Auto" MaxHeight="500" SelectionChanged="dlgGSDAT_SelectionChanged" EnableColumnVirtualization="False" HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=GSART}" Header="纱线" Width="80" />
                        <DataGridTextColumn Binding="{Binding Path=GSVAR}" Header="版本" Width="20" />
                        <DataGridTextColumn Binding="{Binding Path=GSGARNBEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="描述" Width="210" />
                    </DataGrid.Columns>
                </fd:FilteringDataGrid>
            </Expander>
        </StackPanel>
    </Grid>
</local:DocumentBase>